
import { SET_ROLE_LIST } from '../constant'

const initState = []

export default function roleListReducer(preState = initState, action) {
  const { type, data = [] } = action
  switch (type) {
    case SET_ROLE_LIST:
      return [...data]
    default:
      return preState
  }
}
